<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>熊猫论坛</title>
    <link rel="stylesheet" href="../static/css/login.css">
    <link rel="stylesheet" href="font-awesome-4.7.0\css\font-awesome.css">


<!--    <script type="text/javascript" src="js/jquery-1.11.1.js" ></script>-->
</head>
<body>
<div id="login-box">
    <h1>熊猫论坛</h1>
    <div class="form">
        <div class="item">
            <i class="fa fa-user" aria-hidden="true"></i>
            <input type="text" placeholder="用户名" id="username">
        </div>
        <div class="item">
            <i class="fa fa-key" aria-hidden="true"></i>
            <input type="password" placeholder="密码" id="password">

        </div>
    </div>

    <button class="loginin">登录</button>
    <div class="other">
        <button>忘记密码</button>
    </div>

</div>

</body>
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
</script>
<script>
    // $(".loginin").on("click",function () {
    //     var username=$('username').val();
    //     var password=$('password').val();
    //     var http='http://127.0.0.1:80/'
    //
    //     $.ajax({
    //         type:"POST",
    //         URL:http+"/user/login",
    //         data:{
    //             username:username,user_password:password,type:1
    //         },
    //         dataType:"json",
    //         timeout:15000,
    //         success:function (data) {
    //             if(data.code=200){
    //                 alert("登录成功");
    //             }
    //
    //         }
    //
    //     })
    //
    // })

    $.post("/user/login",{username:"ddd",password:"ddd"},function (data){

        if (data.code==200){
            alert("登录成功")
        }
    })

</script>
</html>
